package bookstudytest.fanxing;

/**
 *
 * @author swordbone
 * @date 2017/12/14
 */
public class Pair <T> {
    private T first;
    private T second;

    public Pair() {
    }
    public Pair(T first, T second) {
        this.first = first;
        this.second = second;
    }

//    泛型方法
    public static <T> T getMiddle(T...t){
        return t[t.length/2];
    }

    public T getFirst() {
        return first;
    }

    public void setFirst(T first) {
        this.first = first;
    }

    public T getSecond() {
        return second;
    }

    public void setSecond(T second) {
        this.second = second;
    }
}
